<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="../templates/principal.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            function handleClienteRequest(xhr, status, args) {
                if (args.validationFailed || !args.loggedIn) {
                    PF('propostaDialog').show();
                } else {
                    PF('propostaDialog').hide();
                }
                PF('propostaDialog').toggleMaximize();
            }
        </script>
    </ui:define>

    <ui:define name="content" id="content">
        <h:form id="frmProposta">
            <p:panel id="panel" header="Bem Vindo a Valorização da Proposta">
                <p:growl id="messages" life="5000" />

                <p:dataTable id="tabProposta" widgetVar="wtabProposta" var="proposta" value="#{propostaBean.lazyModel}" 
                             lazy="true" paginator="true" rows="12" paginatorPosition="top"
                             emptyMessage="Nenhum Registro Retornado ..." filterEvent="enter" resizableColumns="true">

                    <f:facet name="header">
                        STATUS: 7 - Valorização da Proposta
                    </f:facet>

                    <p:column headerText="Numero Proposta" sortBy="#{proposta.numProposta}" filterBy="#{proposta.numProposta}">
                        <div style="text-align: left;">
                            <h:outputText value="#{proposta.numProposta}" />
                        </div>
                    </p:column>

                    <p:column headerText="Empreendimento" sortBy="#{proposta.idEmpreendimento.dscEmpreendimento}" filterBy="#{proposta.idEmpreendimento.dscEmpreendimento}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idEmpreendimento.dscEmpreendimento}" />
                        </div>
                    </p:column>

                    <p:column headerText="Assunto" sortBy="#{proposta.dscProposta}" filterBy="#{proposta.dscProposta}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.dscProposta}" />
                        </div>
                    </p:column>
                    <p:column headerText="Empresa" sortBy="#{proposta.idEmpresa.nomEmpresa}" filterBy="#{proposta.idEmpresa.nomEmpresa}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idEmpresa.nomEmpresa}" />
                        </div>
                    </p:column>

                    <p:column headerText="Cliente Nome Fantasia/Sobrenom" sortBy="#{proposta.idCliente.nomFantasia}" filterBy="#{proposta.idCliente.nomFantasia}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idCliente.nomFantasia}" />
                        </div>
                    </p:column>

                    <p:column style="width:12%;">
                        <h:panelGrid columns="4" styleClass="actions" cellpadding="0">
                            <p:commandButton id="selectButtonProposta" update=":frmProposta:panelDetalheValor :frmProposta:messages :frmProposta:panel" 
                                             icon="ui-icon-search" title="Visualizar // Alterar Proposta" oncomplete="PF('propostaDialog').show(); PF('propostaDialog').toggleMaximize();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                                <f:setPropertyActionListener value="#{false}" target="#{propostaBean.ativa}" />
                            </p:commandButton>

                            <p:commandButton id="finalizarButtonProposta" update=":frmProposta:panel :frmProposta:messages" 
                                             icon="ui-icon-note" title="Gerar Ordem de Serviço" oncomplete="PF('confirmationFinalizar').show();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                                <f:setPropertyActionListener value="#{8}" target="#{propostaBean.cstatus}" />
                            </p:commandButton>

                            <p:commandButton id="encerraButtonProposta" update=":frmProposta:messages :frmProposta:panel" 
                                             icon="ui-icon-suitcase" title="Finalizar Proposta - Não Aprovada" oncomplete="PF('confirmationFinalizar').show();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                                <f:setPropertyActionListener value="#{9}" target="#{propostaBean.cstatus}" />
                            </p:commandButton>

                            <p:commandButton id="excluirButtonProposta" update=":frmProposta:panel :frmProposta:messages" 
                                             icon="ui-icon-trash" title="Excluir Proposta" oncomplete="PF('confirmation').show();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                            </p:commandButton>
                        </h:panelGrid>
                    </p:column>
                </p:dataTable>

                <!-- DETALHES PROPOSTA -->
                <p:dialog id="dialog" header="Detalhes Proposta" widgetVar="propostaDialog" resizable="true"
                          onHide="propostaDialog.toggleMaximize();" showEffect="explode" hideEffect="explode" style="text-align: left" position="top" maximizable="true">
                    <p:panel id="panelDetalheValor">
                        <p:panelGrid id="displaytab1" style="text-align: left; width: 100%;">

                            <p:row>
                                <p:column>
                                    <h:outputText value="Numero Proposta: #{propostaBean.selectedProposta.numProposta}" style="font-weight:bold;" />
                                </p:column>
                                <p:column colspan="2">
                                    <p:column>
                                        <p:commandButton id="selectButtonPropostaOrgao" value="Visualizar Lista de Orgão" update=":frmProposta:panelDetalheOrgao :frmProposta:messages" 
                                                         icon="ui-icon-search" title="Visualizar Lista de Orgão" oncomplete="PF('propostaDialogOrgao').show()" />
                                    </p:column>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="* Assunto:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:outputLabel id="inDescricao" value="#{propostaBean.selectedProposta.dscProposta}" style="width:800px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Empresa:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:outputLabel id="inEmpresa" value="#{propostaBean.selectedProposta.idEmpresa.nomEmpresa}" style="width:800px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="* Cliente:" />
                                </p:column>
                                <p:column>
                                    <p:outputLabel id="inCliente" value="#{propostaBean.selectedProposta.idCliente.nomCliente}" 
                                                   style="width:500px; font-weight:bold; " />

                                    <!-- <p:commandButton icon="ui-icon ui-icon-search" title="Pesquisar Cliente" update=":frmProposta:panelCliente" onclick="clienteDialog.show();" /> -->
                                </p:column>
                                <p:column>
                                    <h:outputText value="Empreendimento:" />
                                </p:column>
                                <p:column>
                                    <p:outputLabel id="inEmpreendimento" value="#{propostaBean.selectedProposta.nomEmpreendimento}" 
                                                   style="width:500px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Endereços:" />
                                </p:column>
                                <p:column>
                                    <ui:repeat value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList}" var="end">
                                        <h:outputText value="#{end.codLogradouro.dscLogradouro}, #{end.numEndereco} #{end.dscComplemento} - " style="font-weight:bold;" />
                                    </ui:repeat>
                                </p:column>
                                <p:column>
                                    <h:outputText value="Cidade:" />
                                </p:column>
                                <p:column>
                                    <h:outputText value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList.get(0).codLogradouro.codBairro.codCidade.dscCidade}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>

                            <p:row> 
                                <p:column>
                                    <h:outputText value="Data Proposta:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:inputMask id="imDatAbert" value="#{propostaBean.selectedProposta.datProposta}" mask="99/99/9999" style="font-weight:bold; ">
                                        <f:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy" />
                                    </p:inputMask>
                                </p:column>
                            </p:row>
                        </p:panelGrid>
                        <p:tabView id="tabView" dynamic="true" activeIndex="#{propostaBean.tabindex}">
                            <p:tab title="Etapas - Honorários" id="tab1">
                                <p:dataTable var="etapa" value="#{propostaBean.selectedProposta.propostaValorList}" rows="5" paginator="true" 
                                             resizableColumns="true"  id="tabPropostaValor" rowIndexVar="rowid" emptyMessage="ATENÇÃO ... Nenhuma Etapa - Escopos/Honorários Cadastrados ..." paginatorPosition="top" editable="true">


                                    <p:column headerText="ETAPA"><h:outputText value="#{etapa.dscEtapa}" /></p:column>
                                    <p:column headerText="ASSUNTO"><h:outputText value="#{etapa.dscAssunto}" /></p:column>
                                    <p:column headerText="VALOR" style="font-weight:bold; text-align: right;">
                                        <p:cellEditor>
                                            <f:facet name="output">
                                                <h:outputText value="#{etapa.vlrEtapa}" style="font-weight:bold; text-align: right;">
                                                    <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                                </h:outputText>
                                            </f:facet>
                                            <f:facet name="input">
                                                <p:inputText id="inVlrCotacao" value="#{etapa.vlrEtapa}" style="width:200px; font-weight:bold; text-align: right;"
                                                             onkeyup="javascript:maskIt(this, event, '###.###.###,##', true)">
                                                    <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                                </p:inputText>
                                            </f:facet>
                                        </p:cellEditor>
                                    </p:column>

                                    <p:column style="width:800px;">
                                        <p:dataTable var="etapaPerc" value="#{etapa.propostaValorPercList}" rows="5" paginator="true" id="gridEtapaPerc" 
                                                     emptyMessage="ATENÇÃO ... Nenhuma Etapa - Escopos/Honorários Cadastrados ..." paginatorPosition="top">

                                            <p:column headerText="FORMA PAGAMENTO" style="width:200px; font-weight:bold; text-align: right;">
                                                <h:outputText value="#{etapaPerc.percEtapa}" converter="percentualConverter" />
                                            </p:column>
                                            <p:column headerText="EVENTO">
                                                <p:cellEditor>
                                                    <f:facet name="output">
                                                        <h:outputText value="#{etapaPerc.dscPerc}" />
                                                    </f:facet>
                                                    <f:facet name="input">
                                                        <p:inputText id="inDescPerc" value="#{etapaPerc.dscPerc}" style="width:500px; font-weight:bold; text-align: left;" />
                                                    </f:facet>
                                                </p:cellEditor>
                                            </p:column>

                                            <p:column headerText="CÁLCULO DO VALOR" style="font-weight:bold; text-align: right;">
                                                <p:cellEditor>
                                                    <f:facet name="output">
                                                        <h:outputText value="#{etapaPerc.vlrProposta}">
                                                            <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                                        </h:outputText>
                                                    </f:facet>
                                                    <f:facet name="input">
                                                        <p:inputText id="inVlrCotacao" value="#{etapaPerc.vlrProposta}" style="width:200px; font-weight:bold; text-align: right;"
                                                                     onkeyup="javascript:maskIt(this, event, '###.###.###,##', true)">
                                                            <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                                        </p:inputText>
                                                    </f:facet>
                                                </p:cellEditor>
                                            </p:column>
                                        </p:dataTable>
                                    </p:column>

                                    <p:column style="width:15px;">
                                        <p:rowEditor />
                                    </p:column>
                                </p:dataTable>
                                <p:panelGrid id="panelTotal" style="width: 100%;">
                                    <f:facet name="header">  
                                        <p:row>
                                            <p:column colspan="5">TOTAL GERAL</p:column>
                                        </p:row>
                                        <p:row>
                                            <p:column>Total Etapas</p:column>
                                            <p:column>Total Calculado</p:column>
                                        </p:row>
                                    </f:facet>
                                    <p:row>
                                        <p:column style="font-weight:bold; text-align: right;">
                                            <h:outputText value="#{propostaBean.selectedProposta.totalEtapa}" >
                                                <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                            </h:outputText>
                                        </p:column>
                                        <p:column style="font-weight:bold; text-align: right;">
                                            <h:outputText value="#{propostaBean.selectedProposta.totalBruto}" style="font-weight:bold; text-align: right;">
                                                <f:convertNumber locale="pt_BR" pattern="###,###,##0.00" minFractionDigits="2" />
                                            </h:outputText>
                                        </p:column>
                                    </p:row>
                                </p:panelGrid> 
                                <div style="text-align: left;">
                                    <p:commandButton value="Gravar Proposta" oncomplete="handleClienteRequest(xhr, status, args)" rendered="#{!propostaBean.ativa}"
                                                     icon="ui-icon-disk" actionListener="#{propostaBean.alterar}" />

                                    <p:commandButton value="Calcular Valores" update=":frmProposta:panelDetalheValor :frmProposta:messages"
                                                     icon="ui-icon-calculator" actionListener="#{propostaBean.calculaValor}" />

                                    <p:commandButton value="Transferir Valores para Proposta" update=":frmProposta:panelDetalheValor :frmProposta:messages"
                                                     icon="ui-icon-disk" actionListener="#{propostaBean.transfereValor}" />

                                    <p:commandButton icon="ui-icon-closethick" value="Fechar" onclick="PF('propostaDialog').hide();" title="Fecha Janela das Propostas!" />
                                </div>
                            </p:tab>
                            <p:tab title="Proposta" id="tab2">
                                <p:panel id="panelDetalhe2" style="text-align: left; ">
                                    <p:panelGrid id="displaytab2" style="text-align: left; width: 100%;">
                                        <p:row>
                                            <p:column colspan="5" headerText="Proposta">
                                                <p:inputTextarea autoResize="false" rows="35"  id="editorModelo" widgetVar="weditorModelo" value="#{propostaBean.selectedProposta.modelo}" style="width:100%;" />
                                            </p:column>
                                        </p:row>

                                        <f:facet name="footer">
                                            <p:row>
                                                <p:column>
                                                    <p:commandButton value="Gravar Proposta" oncomplete="handleClienteRequest(xhr, status, args)" rendered="#{!propostaBean.ativa}"
                                                                     icon="ui-icon-disk" actionListener="#{propostaBean.alterar}" />
                                                    <p:commandButton icon="ui-icon-closethick" value="Fechar" onclick="PF('propostaDialog').hide();" title="Fecha Janela das Propostas!" />
                                                </p:column>

                                                <p:column>
                                                    <p:commandButton value="Exportar Word" icon="ui-icon-document" update=":frmProposta:panelDetalheValor, :frmProposta:messages" 
                                                                     title="Exportar dados para Word" actionListener="#{propostaBean.exportarDocWORD}" />
                                                </p:column>

                                                <p:column colspan="3">
                                                    <p:commandButton value="Abrir Documento Word" icon="ui-icon-document" update=":frmProposta:panelDetalheValor, :frmProposta:messages" 
                                                                     title="Abrir Documento Word"  onclick="PrimeFaces.monitorDownload(start, stop)" rendered="#{propostaBean.abrearquivo}">
                                                        <p:fileDownload value="#{propostaBean.file}" />
                                                    </p:commandButton>

                                                </p:column>
                                            </p:row>
                                        </f:facet>
                                    </p:panelGrid>
                                </p:panel>
                            </p:tab>
                        </p:tabView>
                    </p:panel>
                </p:dialog>

                <!-- EXCLUIR PROPOSTA -->
                <p:dialog header="Confirma a Exclusão dessa Proposta: #{propostaBean.selectedProposta.dscProposta}?" widgetVar="confirmation">

                    <p:commandButton value="Sim" update=":frmProposta:panel :frmProposta:messages" process="@all" oncomplete="PF('confirmation').hide(),PF('propostaDialog').hide()"
                                     actionListener="#{propostaBean.excluir}" />
                    <p:commandButton value="Não" onclick="PF('confirmation').hide();" type="button" />

                </p:dialog>
                <!-- FINALIZAR PROPOSTA -->
                <p:dialog header="Confirma a Finalização dessa Etapa da Proposta: #{propostaBean.selectedProposta.dscProposta}?" widgetVar="confirmationFinalizar">

                    <p:commandButton value="Sim" update=":frmProposta:panel :frmProposta:messages" process="@all" oncomplete="PF('confirmationFinalizar').hide()"
                                     actionListener="#{propostaBean.finalizarProposta}" />
                    <p:commandButton value="Não" onclick="PF('confirmationFinalizar').hide();" type="button" />

                </p:dialog>
                <!-- PESQUISA MODELO PROPOSTA -->
                <p:dialog id="dialogModeloProposta" header="Pesquisa Modelo Proposta" widgetVar="modeloPropostaDialog" resizable="true"
                          width="1000" showEffect="explode" hideEffect="explode" position="right,top">

                    <p:panel id="panelModeloProposta" style="text-align: left">
                        <p:dataTable id="tabPropostaModelo" widgetVar="wtabPropostaModelo" var="propostaModelo" value="#{propostaModeloBean.lazyModel}" 
                                     paginator="true" rows="15" paginatorPosition="top" emptyMessage="Nenhum Registro Retornado ..." lazy="true" filterEvent="enter">

                            <p:column headerText="Descrição do Modelo" sortBy="#{propostaModelo.dscModelo}" filterBy="#{propostaModelo.dscModelo}" style="text-align: left">
                                <h:outputText value="#{propostaModelo.dscModelo}" />
                            </p:column>

                            <p:column style="width: 50px">
                                <p:commandButton id="selectButton" update=":frmProposta:tabView, :frmProposta:messages" 
                                                 process="@all" icon="ui-icon-search" title="Selecionar Modelo de Proposta" oncomplete="PF('modeloPropostaDialog').hide()">
                                    <f:setPropertyActionListener value="#{propostaModelo}" target="#{propostaBean.selectedPropostaModelo}" />
                                </p:commandButton>

                            </p:column>

                        </p:dataTable>
                    </p:panel>
                </p:dialog>
                <!-- PESQUISA LISTA DE ORGAO -->
                <p:dialog id="dialogOrgao" header="Detalhes Proposta - Preenchimento dos Documentos Necessários" widgetVar="propostaDialogOrgao" resizable="true" dynamic="true" 
                          position="right,top" onShow="propostaDialogOrgao.toggleMaximize();" maximizable="true">

                    <p:panel id="panelDetalheOrgao" style="text-align: left; ">
                        <p:panelGrid id="displayOrgao" style="text-align: left; width: 100%;">

                            <p:row>
                                <p:column colspan="5">
                                    <h:outputText value="Numero Proposta: #{propostaBean.selectedProposta.numProposta}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Assunto:" />
                                </p:column>
                                <p:column>
                                    <h:outputText id="inDescricaoOrgao" value="#{propostaBean.selectedProposta.dscProposta}" style="width:500px; font-weight:bold; " />
                                </p:column>

                                <p:column>
                                    <h:outputText value="Arquiteto:" />
                                </p:column>
                                <p:column colspan="2">
                                    <h:outputText id="inArquitetoOrgao" value="#{propostaBean.selectedProposta.idEmpreendimento.nomArquiteto}" style="width:300px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Cliente:" />
                                </p:column>

                                <p:column>
                                    <h:outputText id="inClienteOrgao" value="#{propostaBean.selectedProposta.idCliente.nomFantasia}" 
                                                  style="width:500px; font-weight:bold; " />
                                </p:column>

                                <p:column>
                                    <h:outputText value="Data Proposta:" />
                                </p:column>

                                <p:column colspan="2">
                                    <h:outputText id="imDatAbertOrgao" value="#{propostaBean.selectedProposta.datProposta}" style="font-weight:bold;">
                                        <f:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy" />
                                    </h:outputText>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Endereços:" />
                                </p:column>

                                <p:column>
                                    <ui:repeat value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList}" var="end">
                                        <h:outputText value="#{end.codLogradouro.dscLogradouro}, #{end.numEndereco} #{end.dscComplemento} - " style="font-weight:bold;" />
                                    </ui:repeat>
                                </p:column>

                                <p:column>
                                    <h:outputText value="Cidade:" />
                                </p:column>

                                <p:column colspan="2">
                                    <h:outputText value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList.get(0).codLogradouro.codBairro.codCidade.dscCidade}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Contribuinte:" />
                                </p:column>

                                <p:column colspan="4">
                                    <ui:repeat value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList}" var="end">
                                        <h:outputText value="#{end.numContribuinte} - " style="font-weight:bold;" />
                                    </ui:repeat>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Protocolado:" />
                                </p:column>

                                <p:column colspan="4">
                                    <h:outputText value="#{propostaBean.selectedProposta.propostaOrgao.dscProtocolado}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>
                        </p:panelGrid>
                        <p:panelGrid id="display1" style="text-align: left; width: 100%;">
                            <f:facet name="header">
                                <p:row>
                                    <p:column colspan="3">ÓRGÃOS</p:column>
                                    <p:column rowspan="2">OBSERVAÇÕES</p:column>
                                </p:row>
                                <p:row>
                                    <p:column colspan="3">SEHAB</p:column>
                                </p:row>
                            </f:facet>

                            <p:row>
                                <p:column style="width: 15%;">
                                    <h:outputText id="options1" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraAprovacao}" style="font-weight:bold;" />
                                </p:column>
                                <p:column colspan="2" style="width: 30%;">ALVARÁ DE APROVAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs1}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options2" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraExecucao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE EXECUÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs2}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options3" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraTerraplanagem}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE    TERRAPLENAGEM</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs3}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options4" value="#{propostaBean.selectedProposta.propostaOrgao.dsccaieps}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CAIEPS</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs4}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options5" value="#{propostaBean.selectedProposta.propostaOrgao.dscctlu}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CTLU</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs5}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options6" value="#{propostaBean.selectedProposta.propostaOrgao.dscceusoDeclividade}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">CEUSO</p:column>
                                <p:column>DECLIVIDADE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs6}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options7" value="#{propostaBean.selectedProposta.propostaOrgao.dscceusoElevacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>ELEVAÇÃO TÉRREO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs7}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options8" value="#{propostaBean.selectedProposta.propostaOrgao.dscparsolo}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">PARSOLO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs8}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options9" value="#{propostaBean.selectedProposta.propostaOrgao.dscsmdu}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SMDU</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs9}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options10" value="#{propostaBean.selectedProposta.propostaOrgao.dscurbanismo}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SP-URBANISMO (ANTIGA EMURB)</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs10}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options11" value="#{propostaBean.selectedProposta.propostaOrgao.dscsmt}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SMT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs11}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options12" value="#{propostaBean.selectedProposta.propostaOrgao.dscsiurbAtinge}" style="font-weight:bold;" />


                                </p:column>
                                <p:column rowspan="2">SIURB</p:column>
                                <p:column>ATINGE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs12}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options13" value="#{propostaBean.selectedProposta.propostaOrgao.dscsiurbNaoAtinge}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>NÃO ATINGE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs13}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options14" value="#{propostaBean.selectedProposta.propostaOrgao.dsciphan}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">IPHAN</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs14}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options15" value="#{propostaBean.selectedProposta.propostaOrgao.dsccondephaat}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CONDEPHAAT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs15}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options16" value="#{propostaBean.selectedProposta.propostaOrgao.dscconpresp}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CONPRESP</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs16}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options17" value="#{propostaBean.selectedProposta.propostaOrgao.dsccetesp}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CETESB</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs17}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options18" value="#{propostaBean.selectedProposta.propostaOrgao.dscdepaveLaa}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">DEPAVE</p:column>
                                <p:column>LAA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs18}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options19" value="#{propostaBean.selectedProposta.propostaOrgao.dscdepaveTca}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>TCA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs19}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options20" value="#{propostaBean.selectedProposta.propostaOrgao.dscsubprefeitura}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SUBPREFEITURA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs20}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options21" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraExecucaoDemolicao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE EXECUÇÃO DE DEMOLIÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs21}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options22" value="#{propostaBean.selectedProposta.propostaOrgao.dscautoConclusao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">AUTO DE CONCLUSÃO DE    DEMOLIÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs22}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options23" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraStand}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE STAND DE VENDAS</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs23}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options24" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraDesdobro}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE DESDOBRO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs24}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options25" value="#{propostaBean.selectedProposta.propostaOrgao.dschabite}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">HABITE-SE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs25}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options26" value="#{propostaBean.selectedProposta.propostaOrgao.dsclicencaFuncionamento}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">LICENÇA DE FUNCIONAMENTO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs26}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options27" value="#{propostaBean.selectedProposta.propostaOrgao.dscautoRegulizarizacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">AUTO DE REGULARIZAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs27}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column colspan="4" styleClass="ui-widget-header">OBSERVAÇÕES</p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options29" value="#{propostaBean.selectedProposta.propostaOrgao.dsccomar}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">COMAR</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs29}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options30" value="#{propostaBean.selectedProposta.propostaOrgao.dscdecont}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">DECONT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs30}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options31" value="#{propostaBean.selectedProposta.propostaOrgao.dscenvoltorio}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ENVOLTÓRIO DE VILA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs31}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options32" value="#{propostaBean.selectedProposta.propostaOrgao.dscmatriculaUnificacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">MATRÍCULA</p:column>
                                <p:column>UNIFICAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs32}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options33" value="#{propostaBean.selectedProposta.propostaOrgao.dscmatriculaRetificacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>RETIFICAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs33}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                        </p:panelGrid>

                    </p:panel>
                </p:dialog>


            </p:panel>

        </h:form>
    </ui:define>
</ui:composition>